{% extends 'activity/content-layout.html.twig' %}

{% do script(['audioactivity/js/show/index.js']) %}

{% block body %}
  {% set audio = activity.ext %}
  <div class="audio-content" id="audio-content" data-role="audio-content" data-id="{{ activity.id }}">
  {% if audio.file|default(null) %}
    {% if audio.hasText %}
      {% set activityContent = activity.content|default('')|convert_absolute_url|raw %}
    {% endif %}
    {{ render(controller('AppBundle:Player:show', {id: audio.mediaId, isPart: true, context: {content:activityContent|default('')}})) }}
  {% else %}
    {% include 'activity/file-not-found.html.twig' with {type:'audio'} %}
  {% endif %}
  </div>
{% endblock %}